package com.aahackathon.tripme;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

import com.aahackathon.tripme.model.Trip;

import java.util.ArrayList;

/**
 * Created by Renats on 10/24/2014.
 */
public class TripList extends Activity {

    public static final String FLIGHT_LIST = "FLIGHT_LIST";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_trip_list);
        ListView lv = (ListView) findViewById(R.id.activity_flight_list_listView);
        ArrayList<Trip> trips = (ArrayList<Trip>) getIntent().getSerializableExtra(FLIGHT_LIST);
        TripAdapter adapter = new TripAdapter(this, trips);
        lv.setAdapter(adapter);
    }
}
